import Vue from 'vue'
import VueRouter from 'vue-router'


Vue.use(VueRouter)

const routes = [
    {
        path: '/',
        name: '/',
        redirect: '/index'
    },
    {
        path: '/index',
        name: 'index',
        component: () => import('../views/IndexView.vue'),
        children: [
            {
                path: '/user',
                name: 'User',
                component: () => import('../views/UserView.vue')
            },
            {
                path: '/agency',
                name: 'agency',
                component: () => import('../views/AgencyManageView.vue')
            },
            {
                path: '/documentVideoManage',
                name: 'documentVideoManage',
                component: () => import('../views/DocumentVideoManageView.vue')
            },
            {
                path: '/testQuestion',
                name: 'testQuestion',
                component: () => import('../views/TestQuestion.vue')
            },
            {
                path: '/documentVideoReview',
                name: 'documentVideoReview',
                component: () => import('../views/DocumentVideoReview.vue')
            },
            {
                path: '/trainingPlan',
                name: 'trainingPlan',
                component: () => import('../views/TrainingPlan.vue')
            },
            {
                path: '/learningSituation',
                name: 'learningSituation',
                component: () => import('../views/LearningSituation.vue')
            },
            {
                path: '/examSituation',
                name: 'examSituation',
                component: () => import('../views/ExamSituation.vue')
            },



            //学员页面
            {
                path: '/consult',
                name: 'consult',
                component: () => import('../views/ForStudent/Consult.vue')
            },
            {
                path: '/trainingPlanForStudent',
                name: 'trainingPlanForStudent',
                component: () => import('../views/ForStudent/TrainingPlanForStudent.vue')
            },
            //个人信息管理
            {
                path: '/infoManage',
                name: 'infoManage',
                component: () => import('../views/ForStudent/InfoManage.vue')
            },
            //机构首页
            {
                path: '/agencyHomePage',
                name: 'agencyHomePage',
                component: () => import('../views/ForStudent/AgencyHomePage.vue')
            },


            //基础参数配置
            {
                path: '/agencyTypeManage',
                name: 'agencyTypeManage',
                component: () => import('../views/BasicParameter/AgencyTypeManageView.vue')
            },
            {
                path: '/trainingCycleManage',
                name: 'trainingCycleManage',
                component: () => import('../views/BasicParameter/TrainingCycleManageView.vue')
            },
            {
                path: '/trainingTypeManage',
                name: 'trainingTypeManage',
                component: () => import('../views/BasicParameter/TrainingTypeManageView.vue')
            },
            {
                path: '/documentVideoTypeManage',
                name: 'documentVideoTypeManage',
                component: () => import('../views/BasicParameter/DocumentVideoTypeManageView.vue')
            },
            {
                path: '/consultManage',
                name: 'consultManage',
                component: () => import('../views/BasicParameter/ConsultManageView.vue')
            },


        ]
    },
    {
        path: '/login',
        name: 'login',
        component: () => import('../views/LoginView.vue')
    },
    {
        path: '/study',
        name: 'study',
        component: () => import('../views/Study.vue')
    },

]

const router = new VueRouter({
    mode: 'history',
    base: process.env.BASE_URL,
    routes
})

export default router
